From: Jonas Ã…dahl Date: Mon, 28 Nov 2022 15:44:18 +0000 (+0100) Subject: ui/main: Don't show welcome screen or root warning with perf tests X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~219 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5bb9843217002c051d3b51ffc6250232e5da2a84;p=gnome-shell.git ui/main: Don't show welcome screen or root warning with perf tests If we want to run with the welcome screen showing, it should be done so explicitly. Hide it if there is a perf test running for now, so that what we test is what is expected to be tested. We also don't want to show the root user warning, since we'll be running as root in the CI containers. Part-of: --- diff --git a/js/ui/main.js b/js/ui/main.js index 2d8804aca..b6f54da9e 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -329,12 +329,16 @@ function _initializeUI() { }); } - let credentials = new Gio.Credentials(); - if (credentials.get_unix_user() === 0) { - notify(_('Logged in as a privileged user'), - _('Running a session as a privileged user should be avoided for security reasons. If possible, you should log in as a normal user.')); - } else if (sessionMode.showWelcomeDialog) { - _handleShowWelcomeScreen(); + const perfModuleName = GLib.getenv('SHELL_PERF_MODULE'); + if (!perfModuleName) { + let credentials = new Gio.Credentials(); + if (credentials.get_unix_user() === 0) { + notify( + _('Logged in as a privileged user'), + _('Running a session as a privileged user should be avoided for security reasons. If possible, you should log in as a normal user.')); + } else if (sessionMode.showWelcomeDialog) { + _handleShowWelcomeScreen(); + } } if (sessionMode.currentMode !== 'gdm' && @@ -343,7 +347,6 @@ function _initializeUI() { LoginManager.registerSessionWithGDM(); - let perfModuleName = GLib.getenv("SHELL_PERF_MODULE"); if (perfModuleName) { let perfOutput = GLib.getenv("SHELL_PERF_OUTPUT"); let module = eval(`imports.perf.${perfModuleName};`);